package cn.demoncat.util.ocr.huawei.entity;

import cn.demoncat.util.lang.constant.card.BusinessLicenseType;
import cn.demoncat.util.lang.entity.card.BusinessLicense;

/**
 * 营业执照
 *
 * @author 延晓磊
 * @since 2020年10月23日
 */
public class BusinessLicenseItem {

    // 营业执照注册号/社会保障号
    private String registration_number;
    // 企业名称
    private String name;
    // 企业类型
    private String type;
    // 经营地址
    private String address;
    // 法人
    private String legal_representative;
    // 注册资本
    private String registered_capital;
    // 成立日期
    private String found_date;
    // 营业期限
    private String business_term;
    // 经营范围
    private String business_scope;
    // 发照日期
    private String issue_date;

    /**
     * 转换为通用对象
     *
     * @return
     */
    public BusinessLicense toCommonData() {
        BusinessLicense data = new BusinessLicense();
        data.setRegistrationNumber(this.getRegistration_number());
        data.setName(this.getName());
        data.setType(BusinessLicenseType.getByName(this.getType()).getType());
        data.setAddress(this.getAddress());
        data.setLegalRepresentative(this.getLegal_representative());
        data.setRegisteredCapital(this.getRegistered_capital());
        data.setFoundDate(this.getFound_date());
        data.setBusinessTerm(this.getBusiness_term());
        data.setBusinessScope(this.getBusiness_scope());
        return data;
    }

    public String getRegistration_number() {
        return registration_number;
    }

    public void setRegistration_number(String registration_number) {
        this.registration_number = registration_number;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getLegal_representative() {
        return legal_representative;
    }

    public void setLegal_representative(String legal_representative) {
        this.legal_representative = legal_representative;
    }

    public String getRegistered_capital() {
        return registered_capital;
    }

    public void setRegistered_capital(String registered_capital) {
        this.registered_capital = registered_capital;
    }

    public String getFound_date() {
        return found_date;
    }

    public void setFound_date(String found_date) {
        this.found_date = found_date;
    }

    public String getBusiness_term() {
        return business_term;
    }

    public void setBusiness_term(String business_term) {
        this.business_term = business_term;
    }

    public String getBusiness_scope() {
        return business_scope;
    }

    public void setBusiness_scope(String business_scope) {
        this.business_scope = business_scope;
    }

    public String getIssue_date() {
        return issue_date;
    }

    public void setIssue_date(String issue_date) {
        this.issue_date = issue_date;
    }
}
